<style>
.mask{
	position: fixed;
	background:rgba(0,0,0,0.5);
	width: 100%;
	height: 100%;
	top: 0;
	text-align: center;
	z-index: 100;
	display: none;
}
 .mask .code_box{
	position: absolute;
	margin-top:-10rem;
	top: 50%;
	left: 50%;
	margin-left: -7.5rem;
	width: 15rem;
	height: 20rem;
	background: #fff;
	border-radius:20px;
	line-height: 2.5rem;
	font-size: 0.7rem;
	color: #000;
	font-weight: bold;
}
 .mask .code_box img{
	width: 10rem;
	height: 10rem;
}
.mask .code_box .img_box{
	line-height: 3;
	height:auto;
} 
.mask .cav_code{
	width: 10rem;
	height: 1.8rem;
	line-height: 1.8rem;
	margin: auto;
	background: #f7f7f7;
	color: #6f6f6f;
}
 .mask .error{
	font-size: 0.65rem;
	line-height: 1.2rem;
	font-weight: normal;
	color: #e85a6a;
	margin-top: 0.5rem;
}
/*核销码*/
.code_box{
	text-align: center;
	background: #fff;
	height: 11.3rem;
	padding-top: 1.1rem;
	margin-bottom: 0.5rem;
}

.code_box img{
	height: 6.5rem;
	width: 6.5rem;
	margin-top: 0.2rem;
	vertical-align: middle;
}
.code_box .cav_code{
	height: 1.7rem;
	line-height: 1.7rem;
	margin: 0.7rem auto;
	margin-bottom: 0.55rem;
	background: #f7f7f7;
	width: 8.2rem;
	color: #666;
	font-size:0.8rem;
}
</style>
<link rel="stylesheet" type="text/css" href="../addons/jy_weishop/custom/templates/mobile/css/coupon.css?v=2.0.0">
<div ng-if="pagedata.op=='main'" class='fui-page  fui-page-current coupon-my-page'>
	<div class='fui-content'>
		<div class="fui-tab fui-tab-success">
			<a ng-class="{'active':pagedata.params.type==0}" class="external" href="javascript:;" ng-click="pagedata.status=10;pagedata.params.type=0;tool.get_list('jy_quan/feelog/jielilist/',true)">活动接龙</a>
			<a ng-class="{'active':pagedata.params.type==1}" class="external" href="javascript:;" ng-click="pagedata.status=10;pagedata.params.type=1;tool.get_list('jy_quan/feelog/jielilist/',true)">拼团接龙</a>
		</div>
		<div class='fui-tab fui-tab-danger' id='cateTab'>
			<a href="javascript:;" ng-click="tool.get_list('jy_quan/feelog/jielilist/status=10',true);pagedata.status=10" ng-class="{'active':pagedata.status==10}">全部</a>
			<a href="javascript:;" ng-click="tool.get_list('jy_quan/feelog/list/status=0',true);pagedata.status=0" ng-class="{'active':pagedata.status==0}">待支付</a>
			<a href="javascript:;" ng-click="tool.get_list('jy_quan/feelog/jielilist/status=1',true);pagedata.status=1" ng-class="{'active':pagedata.status==1}">已接龙</a>
			<a href="javascript:;" ng-click="tool.get_list('jy_quan/feelog/jielilist/status=2',true);pagedata.status=2" ng-class="{'active':pagedata.status==2}">已完成</a>
			<a href="javascript:;" ng-click="tool.get_list('jy_quan/feelog/jielilist/status=4',true);pagedata.status=4" ng-class="{'active':pagedata.status==4}">退款售后</a>
		</div>
		<div ng-if="pagedata.list.length<1" class="fui-message fui-message-popup in content-empty" style=" margin-top: 0; padding-top: 0; position: relative; height: auto; background: none;">
				<div class="icon">
					<i class="icon icon-information"></i>
				</div>
				<div class="content">您还没有接龙凭证~</div>
		</div>
		<div ng-if="pagedata.params.type==0" ng-include="sys_html('_jieli')"></div>
		<div ng-if="pagedata.params.type==1" ng-include="sys_html('_jieli1')"></div>
	</div>
</div>
<div class="order-list-page" ng-if="pagedata.op == 'detail'">
	<style>
	.weui_cell_bd {
		padding: 0.3rem;
	}
	</style>
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">接龙详情</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content member-page' style="top:0">
	<div style="padding:0.5rem">
		<div class="fui-list-group merchgroup">
			<div class="fui-list jump">
                <a class="fui-list-media">
                    <img class="round" src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/nopic.jpg'}}" />
                </a>
                <div class="fui-list-inner">
					<div class="title" style="font-size:0.65rem">手机号：{{pagedata.member.mobile}}</div>
					<div class="title" style="font-size:0.65rem">昵称：{{pagedata.member.nickname}}</div>
                </div>
                <a class="jump" href="javascript:;">
					
				</a>
            </div>
		</div>
		<div class="weui_cells">
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>接龙标题</span>
					</div>
					<div class="weui_cell_ft" >{{pagedata.item.title}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>接龙类型</span>
					</div>
					<div class="weui_cell_ft" >{{pagedata.order.typetitle}}</div>
			</div>
			<div ng-if="pagedata.order.remark"  class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>备注</span>
					</div>
					<div class="weui_cell_ft">{{pagedata.order.remark || '无'}}</div>
			</div>
			<div ng-if="pagedata.order.orderid>0" class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>接龙费用</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.order.fee">{{pagedata.order.fee}}元</div>
			</div>
			<div ng-if="pagedata.order.orderid>0" class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>实际支付</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.order.fee">{{pagedata.order.fee}}元</div>
			</div>
		</div>
		<div ng-if="pagedata.order.fileds.length>0" class="weui_cells_title">
		<strong style="font-size: 0.8rem;">接龙项目</strong> / <small>Con&nbsp;Jielong</small>
		<span class="r-f bold" href="javascript:;" ng-click="toogle(pagedata,'show1')" style="color:#333"><i class="icon icon-moreunfold"></i></span>
		</div>
		<div  ng-if="pagedata.show1" class="weui_cells" ng-repeat="group in pagedata.order.fileds">
				<div class="weui_cell" ng-repeat="f in group" ng-if="f.title">
						<div class="weui_cell_bd weui_cell_primary">
							<span>{{f.title}}</span>
						</div>
						<div ng-if="f.type !=18 && f.type !=3 && f.type !='option'" class="weui_cell_ft">{{f.data}}</div>
						<div ng-if="f.type ==3" class="weui_cell_ft">
							<ul class="weui_uploader_files" ng-if="f.data">
								  <li class="weui_uploader_file" style="background-image:url({{tomedia(f.data)}})"></li>
							</ul>
						</div>
						<div ng-if="f.type ==18" class="weui_cell_ft">￥<span class="price">{{f.data || '0.00'}}</span></div>
						<div ng-if="f.type =='option'" class="weui_cell_ft">
							<span class="jylabel jylabel-red" style="margin:0.2rem;line-height:1.2rem">{{f.data}}</span>
						</div>
				</div>
		</div>
		<div class="weui_cells_title"><strong style="font-size: 0.8rem;">接龙内容</strong> / <small>Con&nbsp;Jielong</small>
		<span class="r-f bold" href="javascript:;" ng-click="toogle(pagedata,'show2')" style="color:#333"><i class="icon icon-moreunfold"></i></span>
		</div>
		<div ng-if="pagedata.show2" class="weui_cells">
				<div class="weui_cell" ng-repeat="f in pagedata.order.data">
						<div class="weui_cell_bd weui_cell_primary">
							<span>{{f.title}}</span>
						</div>
						<div ng-if="f.type ==1 || f.type ==2 || f.type ==6 || f.type ==8 || f.type ==9 || f.type ==6" class="weui_cell_ft" ng-model="f.data">{{f.data}}</div>
						<div ng-if="f.type ==3 || f.type ==10" class="weui_cell_ft" ng-model="f.data">
						<ul class="weui_uploader_files" ng-if="f.data">
							  <li class="weui_uploader_file" style="background-image:url({{tomedia(f.data)}})"></li>
						</ul>
						</div>
						<div ng-if="f.type ==4" class="weui_cell_ft">
							<span class="jylabel jylabel-f60">{{f.value}}</span>
						</div>
						<div ng-if="f.type ==5" class="weui_cell_ft">
							<span class="jylabel jylabel-f60" ng-repeat="(k,v) in f.data track by $index">{{v}}</span>
						</div>
						<div ng-if="f.type ==7" class="weui_cell_ft">{{f.data.province}} {{f.data.district}} {{f.data.city}} {{f.data.xiangxi}}</div>
						<div ng-if="f.type ==18" class="weui_cell_ft">￥<span class="price">{{f.data || '0.00'}}</span></div>
				</div>
				<div ng-if="!pagedata.order.data || pagedata.order.data.length<1" class="weui_cell">
					<div class="content-empty" style="margin-top:0.5rem">
						  <p style="color: #999;font-size: .75rem">无接龙内容...</p>
					</div>
				</div>
		</div>
		<div class="weui_cells_title"><strong style="font-size: 0.8rem;">其他选填内容</strong> / <small>Con&nbsp;Jielong</small>
		<span class="r-f bold" href="javascript:;" ng-click="toogle(pagedata,'show3')" style="color:#333"><i class="icon icon-moreunfold"></i></span>
		</div>
		<div  ng-if="pagedata.show3" class="weui_cells">
				<div class="weui_cell" ng-repeat="f in pagedata.order.diydata">
						<div class="weui_cell_bd weui_cell_primary">
							<span>{{f.title}}</span>
						</div>
						<div ng-if="f.type ==1 || f.type ==2 || f.type ==6 || f.type ==8 || f.type ==9" class="weui_cell_ft">{{f.data}}</div>
						<div ng-if="f.type ==3 || f.type ==10" class="weui_cell_ft">
						<ul class="weui_uploader_files" ng-if="f.data">
							  <li class="weui_uploader_file" style="background-image:url({{tomedia(f.data)}})"></li>
						</ul>
						</div>
						<div ng-if="f.type ==4" class="weui_cell_ft">
							<span class="jylabel jylabel-f60">{{f.data}}</span>
						</div>
						<div ng-if="f.type ==5" class="weui_cell_ft">
							<span class="jylabel jylabel-f60" ng-repeat="(k,v) in f.data track by $index">{{v}}</span>
						</div>
						<div ng-if="f.type ==7" class="weui_cell_ft">{{f.data.province}} {{f.data.district}} {{f.data.city}} {{f.data.xiangxi}}</div>
						<div ng-if="f.type ==18" class="weui_cell_ft">￥<span class="price">{{f.data || '0.00'}}</span></div>
				</div>
				<div ng-if="!pagedata.order.diydata || pagedata.order.diydata.length<1" class="weui_cell">
					<div class="content-empty" style="margin-top:0.5rem">
						  <p style="color: #999;font-size: .75rem">无接龙内容...</p>
					</div>
				</div>
		</div>
	</div>
	</div>
</div>
<div class="mask">
		<div class="code_box">
							<p>请将二维码出示给店员</p>
							<div class="img_box" id="show_verify_ewm">
								
							</div>
							<div class="cav_code" id="show_verify_code"></div>
							<div class="error">
								<p style="padding: 0 1.3rem">温馨提示：为了更好的保护您利益,请不要轻易将您的核销二维码泄露给他人</p>
							</div>
	</div>
</div>
<div ng-if="pagedata.showtuikuan" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showtuikuan=false"></i>
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">退款理由</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.remark"></textarea>
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;" ng-click="post({'remark':pagedata.remark},'/feelog/tuikuan/id='+pagedata.item.id)" class="nav-item btn btn-danger confirmbtn">确定退款</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.buypay=function(id){
	scope.post_json('/feelog/pay/id='+id,{},function(pay_id){
		require(['tool'],function(tool){
			tool.pay(pay_id,function(res){
				console.log('收到支付结果！');
				if(res.type=='success'){
					scope.message('支付成功！','','feelog/');
				}else{
					scope.message('充值失败！');
				}
			});
		});
	});
}
scope.tool.get_list('jy_quan/feelog/jielilist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_quan/feelog/jielilist/status='+scope.pagedata.status);
}
scope.pagedata.show_verify=function(url,code){
			scope.tool.qr(url,'show_verify_ewm',150)
			$('#show_verify_code').text(code);
			$('.mask').css({display:'block'});
}	
$('.mask').click(function(){
	$(this).css({display:'none'})
})
</script>